;;2010/10/23 23:21:59

(provide 'zhang_orgmode)

;; The following lines are always needed.  Choose your own keys.
;;(add-to-list 'load-path "~/Plugin/extraload/org/lisp")
;;(add-to-list 'load-path "~/Plugin/extraload/org/contrib/lisp")
;;==========add calfw mode=========================
;;(add-to-list 'load-path "~/Plugin/extraload/emacs-calfw")
;;==========default org configuration==================
(require 'org)
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)
(global-font-lock-mode 1)                     ; for all buffers
(setq org-hide-leading-stars 1)
(add-hook 'org-mode-hook 'turn-on-font-lock)  ; Org buffers only

;;============time stamp for org logging===============
(setq org-log-done 'time)

;;============turn on latex input======================
(add-hook 'org-mode-hook 'turn-on-org-cdlatex)

;;============export to Tex or PDF=====================
(require 'org-latex)
;;from http://orgmode.org/worg/org-contrib/babel/examples/article-class.html
(setq org-export-latex-listings t)
(add-to-list 'org-export-latex-classes
             '("org-article"
               "\\documentclass{org-article}
                 [NO-DEFAULT-PACKAGES]
                 [EXTRA]"
               ("\\section{%s}" . "\\section*{%s}")
               ("\\subsection{%s}" . "\\subsection*{%s}")
               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
               ("\\paragraph{%s}" . "\\paragraph*{%s}")
               ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
(add-to-list 'org-export-latex-classes
             '("ctexart"
               "\\documentclass{ctexart}
                 [NO-DEFAULT-PACKAGES]
                 [NO-PACKAGES]
                 [EXTRA]"
               ("\\section{%s}" . "\\section*{%s}")
               ("\\subsection{%s}" . "\\subsection*{%s}")
               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
               ("\\paragraph{%s}" . "\\paragraph*{%s}")
               ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

;;===============set for HTML export==========================
(require 'org-publish)
(setq org-publish-project-alist
      '(
	;;
	("org-notes"
	 :base-directory "d:/work/orgfile/org/"
	 :base-extension "org"
	 :publishing-directory "d:/work/orgfile/public_html/"
	 :recursive t
	 :publishing-function org-publish-org-to-html
	 :headline-levels 4        ; Just the default for this project.
	 :auto-preamble t
	 )
	("org-static"
	 :base-directory "~/org/"
	 :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
	 :publishing-directory "d:/work/orgfile/public_html/"
	 :recursive t
	 :publishing-function org-publish-attachment
	 )
	("org" :components ("org-notes" "org-static"))
	))
;;===================================================
(require 'calfw)
